package usb;

public class MainBoard {
	private String brand;
	private String cpu = "i7", mem = "金士顿200G DDR40";

	private USB[] usbs = new USB[4];

	// 把usb设备接入电脑
	public boolean plugin(USB b) {
		for (int i = 0; i < usbs.length; i++) {
			if (usbs[i] == null) {
				usbs[i] = b;
				return true;// 有空位，成功
			}
		}
		return false;
	}

	// 工作
	public void work() {
		for (int i = 0; i < usbs.length; i++) {
			if (usbs[i] != null) {
				usbs[i].start();
			}
		}
	}
}
